<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/commons/global.jsp" %>
<%@ include file="/commons/kindeditor.jsp" %>
<script type="text/javascript">
    $(function() {
    	//初始化类目选择和图片上传器
		TAOTAO.init({fun:function(node){}});
        $('#blackListEditForm').form({
            url : '${path}/admin/blackList/edit',
            onSubmit : function() {
                progressLoad();
                var isValid = $(this).form('validate');
                if (!isValid) {
                    progressClose();
                }
                return isValid;
            },
            success : function(result) {
                progressClose();
                result = $.parseJSON(result);
                if (result.success) {
                    parent.$.modalDialog.openner_dataGrid.datagrid('reload');//之所以能在这里调用到parent.$.modalDialog.openner_dataGrid这个对象，是因为user.jsp页面预定义好了
                    parent.$.modalDialog.handler.dialog('close');
                } else {
                    parent.$.messager.alert('错误', result.msg, 'error');
                }
            }
        });
    });
</script>
<div style="padding:10px 10px 10px 10px">
        <form id="blackListEditForm" method="post" enctype="multipart/form-data">
            <table class="grid">
				<input id="id" name="id" type="hidden" value="${blackList.id}" />
                <tr>
                    <td>类型:</td>
					<td>
						<select id="type" name="type" class="easyui-combobox" data-options="width:200,height:29,editable:false,panelHeight:'auto'">
							${dic:getBusDictListToOption("BLACKLIST_TYPE")}
						</select>
					</td>
				</tr>
                <tr>
                    <td>状态:</td><%-- 0正常 1临时解封--%>
					<td>
						<select id="hstatus" name="hstatus" class="easyui-combobox" data-options="width:200,height:29,editable:false,panelHeight:'auto'">
							${dic:getBusDictListToOption("BLACKLIST_HSTATUS")}
						</select>
					</td>
				</tr>
                <tr>
                    <td>值:</td>
					<td>
						<input id="value" name="value" type="text" placeholder="请输入值" class=" easyui-textbox" data-options="required:true,width:300"  value="${blackList.value}" />
					</td>
				</tr>
                <tr>
                    <td>备注:</td>
					<td>
						<input id="remark" name="remark" type="text" placeholder="请输入备注" class="easyui-textbox" data-options="multiline:true,height:80,width:300" value="${blackList.remark}"/>

					</td>
				</tr>
				<script type="text/javascript">
                    //下拉框赋值
                    $("#type").val('${blackList.type}');
                    $("#hstatus").val('${blackList.hstatus}');

				</script>
            </table>
        </form>
    </div>
